<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<div id='message'>
   
</div>
<form action="<%=basePath%>backend/updateimage" class='form-horizontal'
	method="post" id='xyForm' enctype="multipart/form-data">
	<div class="row-fluid">
		<c:if test="${not empty indexImage.imgUrl }">
			<div class="span7 input-prepend"
				style='margin-left: 100px; '>

				<div class="input-prepend">
					<span class="add-on">图片</span> <img alt=""
						src="<%=basePath %>${indexImage.imgUrl }" style='wdith:100px;height:100px;'
						>
				</div>


			</div>
		</c:if>
		<div class='span12 div-common control-group'
			style='margin-left: 100px;'>
			<div class="span7 " style='height: 100px;'>
				<div class="control-group">
					<label class="control-label">图&nbsp;片&nbsp;上&nbsp;传（<span
						style='color: #990000;'>如果不修改该图片，可不选择</span>）:
					</label>
					<div class="controls">
						<input type="file" class='form-control' name="fileste"
							id="picture" />
					</div>
				</div>
			</div>
			<div class="span5" id="photo">
				<font color="red">你添加了的图片：</font> <br>
			</div>
		</div>


	</div>
	<div class="row div-common" style='margin-top: 10px;'>

		<!-- Optional: clear the XS cols if their content doesn't match in height -->

		<div class="span5 input-prepend"
			style='margin-top: 10px; margin-left: 10px;'>
			<span class="add-on">类 别</span> <select class="span6" id='imgType'
				name='imgType'>
				<option value='0'>---请选择---</option>
				<option value="1">首页</option>
				<option value="2">党建</option>
				<option value="3">学生工作</option>
			</select>

		</div>

	</div>
	<div class="row" style='margin-top: 10px;'>
		<div class="span5 control-group">
			<span class="control-label"> 简介: </span>
			<div class='controls'>
				<textarea style='width: 300px; height: 200px;' name="imgIntro">
				   ${indexImage.imgIntro }
				</textarea>
			</div>
		</div>


	</div>
	<input type="hidden" value="${indexImage.imgType }" id='type'>
	<input type="hidden" value="${indexImage.imgId }" name='imgId'>
	<input class='btn btn-info' type="submit" value="提交"  style='margin-left:400px;margin-top:10px;' />
</form>
<script type="text/javascript">
   $(function(){
	 // alert($('#type').val());
	  $("#imgType").val($('#type').val());
   });
</script>